//    Copyright (C) 2013  <lugocreation@gmail.com>
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>
package org.jpgolay.wi.util;

import java.awt.Container;
import java.awt.GridLayout;
import javax.swing.*;

public class ChoiceFileListGUI extends JFrame {

    public ChoiceFileListGUI() {
        setIconImage((new ImageIcon(getClass().getResource("/org/jpgolay/wi/images/logo.gif"))).getImage());
        initComponents();
    }

    private void initComponents() {
        jPanel1 = new JPanel();
        choiceCB = new JComboBox();
        numFicheF = new JTextField();
        jLabel2 = new JLabel();
        listeB = new JButton();
        setTitle("S\351lection");
        setResizable(false);
        jPanel1.setLayout(new GridLayout(4, 1));
        choiceCB.setModel(new DefaultComboBoxModel(new String[]{
                    "Entrer un num\351ro de fiche", "Entrer une r\351f\351rence de fiche"
                }));
        jPanel1.add(choiceCB);
        numFicheF.setHorizontalAlignment(0);
        numFicheF.setToolTipText("entrer le numero de la fiche et taper 'enter'");
        jPanel1.add(numFicheF);
        jLabel2.setHorizontalAlignment(0);
        jLabel2.setText("ou appeler la liste des biens");
        jPanel1.add(jLabel2);
        listeB.setIcon(new ImageIcon(getClass().getResource("/org/jpgolay/wi/images/liste_bien.png")));
        jPanel1.add(listeB);
        getContentPane().add(jPanel1, "Center");
        pack();
    }

    public JButton getListeB() {
        return listeB;
    }

    public JTextField getNumFicheF() {
        return numFicheF;
    }

    public String getNumFiche() {
        return numFicheF.getText();
    }

    public int getChoice() {
        return choiceCB.getSelectedIndex();
    }
    private JComboBox choiceCB;
    private JLabel jLabel2;
    private JPanel jPanel1;
    private JButton listeB;
    private JTextField numFicheF;
}
